package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import pojo.UnrentDto;
import server.UnrentServer;

public class UnrentServlet extends HttpServlet {
	public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException{
		System.out.println("unrentSerclet");
		String roomNum = request.getParameter("payment");
		UnrentServer unrent = new UnrentServer();
		UnrentDto unrentDto = unrent.unrent(roomNum);
		HttpSession session = request.getSession();
		session.setAttribute("unrentDto", unrentDto);
		response.sendRedirect("/hotel/checkOut.jsp");
		
		
	}

}
